<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>欢迎光临 Music Store</title>
<link type="text/css" rel="Stylesheet"
	href="${pageContext.request.contextPath }/style/front.css" />
<script src="${pageContext.request.contextPath}/script/jquery-1.10.2.js"></script>
<script>
	$(function() {
		$("#search").click(function() {
			location.href = "orderBiz";
		});
	})
</script>
<style>
#title {
	width: 950px;
	margin: 10px auto;
	height: 40px;
	background-color: white;
}

#title h3 {
	line-height: 40px;
	margin: 0px 30px;
	font-size: 18px;
}

#main {
	width: 930px;
	margin: 0px auto;
}

.table thead {
	font-weight: bold;
}

.table table {
	text-align: center;
	margin: 10px auto;
}

.table td {
	width: 100px;
	background-color: #f4f4f4;
	padding: 2px 0px;
}

.table .sp {
	width: 200px;
}

hr {
	margin: 5px 0px;
}

.search {
	margin: 5px 10px;
}
</style>
</head>

<body>
	<div id="wrapper">
		<s:action name="header" executeResult="true" namespace="/admin"></s:action>
		<div id="content">
			<div id="title">
				<h3>商品管理</h3>
			</div>
			<div id="main">
				<div class="search">
					<form action="orderBiz" method="post">
						发货状态：<select name="isDeliveried">
						<c:if test="${isDeliveried==0 }">
							<option value="0" selected="selected">未发货</option>
							</c:if>
							<c:if test="${isDeliveried==1  }">
								<option value="1" selected="selected">已发货</option>
							</c:if>
						</select> &nbsp;&nbsp;&nbsp; 订单编号：<input type="text" name="orderId" value="${orderId }"/>&nbsp;&nbsp;&nbsp;
						开始日期：<input type="text" name="startDate" value=${ startDate}/>&nbsp;&nbsp;&nbsp;
						结束日期：<input type="text" name="endDate" value=${endDate }/>&nbsp;&nbsp;&nbsp; <input
							type="submit" value="查询" />
					</form>
				</div>
				<hr />
				<div class="table">
					<h3>订单列表：</h3>
					<table>
						<thead>
							<tr>
								<td>订单编号</td>
								<td class="sp">订单日期</td>
								<td>用户</td>
								<td>总金额</td>
								<td>状态</td>
								<td>操作</td>
								<td>详细</td>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${orderList }" var="o">
								<tr>
									<td>${o.id }</td>
									<td class="sp">${o.orderDate }</td>
									<td>${o.username }</td>
									<td>${o.totalPrice }</td>
									<td><c:if test="${o.isDeliveried==0 }">
										未发货
									</c:if></td>
									<td><input type="button" value="发货" id="deliever" /></td>
									<td><a href="orderDetail?id=${o.id }">详细</a></td>
								</tr>
								
							</c:forEach>
						</tbody>
					</table>
				</div>
			</div>
			<div class="clearBoth"></div>
		</div>
		<%@ include file="../shared/back.jsp"%>
	</div>
</body>
</html>
